layui.use(['table', 'laydate', 'jquery', 'form'], () => {
    let table = layui.table,
        laydate = layui.laydate,
        $ = layui.jquery;
    laydate.render({
        elem: '#startDate'
        , type: 'datetime'
    });
    laydate.render({
        elem: '#endDate'
        , type: 'datetime'
    });
    dict = getDict();
    let cols = [[
        {type: 'checkbox', fixed: 'left'}
        , {field: 'id', title: 'ID', fixed: 'left', unresize: true, sort: true}
        , {field: 'userId', title: 'userId', hide: true}
        , {field: 'username', title: '姓名', align: 'center'}
        , {
            field: 'status', title: '签到状态', sort: true, align: 'center', templet: (e) => {
                return dict.signStatus[e.signStatus];
            }
        }
        , {field: 'createTime', title: '签到时间', align: 'center', sort: true}
        , {field: 'latedTime', title: '迟到时间', align: 'center'}
        // , {field: 'createTime', title: '创建时间', align: 'center', sort: true}
        , {field: 'updateTime', title: '更新时间', align: 'center'}
        , {fixed: 'right', title: '操作', toolbar: '#barDemo', width: 150, align: 'center'}
    ]];

    render("signTable", {
        "query": "/admin/sign/query",
        "delete": "/admin/sign/delete",
        "batchDelete": "/admin/sign/batchDelete",
        "template": "../sign/signUpdate.html",
    }, "签到", cols, ['30%', '40%']);
    queryFormSelectRender(queryForm, dict);
});
